package com.sjz.vhr.utis;

import com.sjz.vhr.model.Hr;
import org.springframework.security.core.context.SecurityContextHolder;

//用来获取当前登录的用户
public class HrUtils {
    public static Hr getCurrentHr() {
        return ((Hr) SecurityContextHolder.getContext().getAuthentication().getPrincipal());
    }
}